<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

//创建后台路由组 在进入任何后台时 都先经过login中间件
Route::group(['middleware'=>'login'],function(){

	
	Route::get('/admin',function(){
    	return view('admin.index.index');
	});

	Route::controller('/admin/user','UserController');
	//景点
	Route::controller('/admin/scenic','ScenicController');
	//图册
	Route::controller('/admin/photo','PhotoController');

	//评论
	Route::controller('/admin/comment','CommentController');

	//后台订单
	Route::controller('/admin/order','OrderController');


});



//后台登录
Route::controller('/admin/login','LoginController');


//前台登录
Route::get('/login','LoginController@HomeLogin');
Route::post('/login','LoginController@doLogin');

//前台注册页面
Route::get('/home', function () {
    return view('/home/register/register');
});

//前台详情页
Route::controller('/detail','DetailController');

//前台个人中心
Route::get('/home/userinfo', function () {
    return view('/home/userinfo/userinfo');
});
//前台信息修改
Route::controller('/home/userinfo','UserinfoController');



//前台订单
Route::controller('/order','OrderController');
//前台支付
Route::post('/home/pay','OrderController@postPay');


//前台找回密码
Route::get('/getpass','LoginController@Getpass');
Route::post('/getpass','LoginController@doGetpass');


//前台国内列表
Route::controller('/home/list','ListController');







//登录注册	
Route::controller('/home/login','LoginController');
//注册时查看是否有重名
Route::controller('/same','LoginController');
//验证码
Route::controller('/code','LoginController');
// Route::get('/code','LoginController@Vcode');
// Route::get('/home/login','LoginController@Vcode');
//发送邮件
// Route::controller('/home/sendmail','LoginController');
//激活账号
Route::get('/jihuo','LoginController@jihuo');





